<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: BezierCurve&lt; T, DIM, NUM_CTR_PT &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('df/da0/class_bezier_curve.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="../../d7/dc0/class_bezier_curve-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">BezierCurve&lt; T, DIM, NUM_CTR_PT &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for BezierCurve&lt; T, DIM, NUM_CTR_PT &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d5/db3/class_bezier_curve__coll__graph.png" border="0" usemap="#_bezier_curve_3_01_t_00_01_d_i_m_00_01_n_u_m___c_t_r___p_t_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="_bezier_curve_3_01_t_00_01_d_i_m_00_01_n_u_m___c_t_r___p_t_01_4_coll__map" id="_bezier_curve_3_01_t_00_01_d_i_m_00_01_n_u_m___c_t_r___p_t_01_4_coll__map">
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a334167d89217111f1a0a92dc7ea16ea9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#a334167d89217111f1a0a92dc7ea16ea9">BezierCurve</a> ()</td></tr>
<tr class="separator:a334167d89217111f1a0a92dc7ea16ea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b0d1dfab02b83f2a0ddcc998e359eef"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#a6b0d1dfab02b83f2a0ddcc998e359eef">SetParam</a> (T **ctrl_pt, T fin_time)</td></tr>
<tr class="separator:a6b0d1dfab02b83f2a0ddcc998e359eef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a805009db14dd135e46f55d83c7463d69"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#a805009db14dd135e46f55d83c7463d69">getCurvePoint</a> (T u, T *ret)</td></tr>
<tr class="separator:a805009db14dd135e46f55d83c7463d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec81de7e144ac68128c19f16c24880a6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#aec81de7e144ac68128c19f16c24880a6">getCurveVelocity</a> (T u, T *ret)</td></tr>
<tr class="separator:aec81de7e144ac68128c19f16c24880a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a724f444a65d87f2b4a475c44a2eedf02"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a> [NUM_CTR_PT][DIM]</td></tr>
<tr class="separator:a724f444a65d87f2b4a475c44a2eedf02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeb66b287ab1251b35c4836a73024e50"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a> [NUM_CTR_PT]</td></tr>
<tr class="separator:adeb66b287ab1251b35c4836a73024e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af260806a5be9aff91007286940fc951d"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a></td></tr>
<tr class="separator:af260806a5be9aff91007286940fc951d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a09ecb5e8cce832d9b26bc58b37eaed12"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/da0/class_bezier_curve.html#a09ecb5e8cce832d9b26bc58b37eaed12">_factorial</a> (const int &amp;n)</td></tr>
<tr class="separator:a09ecb5e8cce832d9b26bc58b37eaed12"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, int DIM, int NUM_CTR_PT&gt;<br />
class BezierCurve&lt; T, DIM, NUM_CTR_PT &gt;</h3>


<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00008">8</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a334167d89217111f1a0a92dc7ea16ea9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::<a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00013">13</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j(0); j &lt; NUM_CTR_PT; ++j) {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[j][i] = 0.;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;      }</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;      <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[j] = 0.;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  }</div><div class="ttc" id="class_bezier_curve_html_a724f444a65d87f2b4a475c44a2eedf02"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">BezierCurve::_CtrlPt</a></div><div class="ttdeci">T _CtrlPt[NUM_CTR_PT][DIM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00010">BezierCurve.h:10</a></div></div>
<div class="ttc" id="class_bezier_curve_html_adeb66b287ab1251b35c4836a73024e50"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">BezierCurve::_coeff</a></div><div class="ttdeci">T _coeff[NUM_CTR_PT]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00011">BezierCurve.h:11</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a09ecb5e8cce832d9b26bc58b37eaed12"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::_factorial </td>
          <td>(</td>
          <td class="paramtype">const int &amp;&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00095">95</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                               {</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">int</span> ret = 1;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(1); i &lt; n + 1; ++i) ret *= (i);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  }</div></div><!-- fragment -->
<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/da0/class_bezier_curve_a09ecb5e8cce832d9b26bc58b37eaed12_icgraph.png" border="0" usemap="#df/da0/class_bezier_curve_a09ecb5e8cce832d9b26bc58b37eaed12_icgraph" alt=""/></div>
<map name="df/da0/class_bezier_curve_a09ecb5e8cce832d9b26bc58b37eaed12_icgraph" id="df/da0/class_bezier_curve_a09ecb5e8cce832d9b26bc58b37eaed12_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a805009db14dd135e46f55d83c7463d69"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::getCurvePoint </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>u</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>ret</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00036">36</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

<p>References <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00012">BezierCurve&lt; T, DIM, NUM_CTR_PT &gt;::_end_time</a>.</p>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                                  {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordflow">if</span> (u &gt; <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a>) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        ret[i] = <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[NUM_CTR_PT - 1][i];</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (u &lt; 0.) {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        ret[i] = <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[0][i];</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;      }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;      u /= <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        ret[i] = 0.;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j(0); j &lt; NUM_CTR_PT; ++j) {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;          ret[i] += <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[j] * pow(u, j) * pow(1 - u, (NUM_CTR_PT - 1) - j) *</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                    <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[j][i];</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  }</div><div class="ttc" id="class_bezier_curve_html_a724f444a65d87f2b4a475c44a2eedf02"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">BezierCurve::_CtrlPt</a></div><div class="ttdeci">T _CtrlPt[NUM_CTR_PT][DIM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00010">BezierCurve.h:10</a></div></div>
<div class="ttc" id="class_bezier_curve_html_adeb66b287ab1251b35c4836a73024e50"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">BezierCurve::_coeff</a></div><div class="ttdeci">T _coeff[NUM_CTR_PT]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00011">BezierCurve.h:11</a></div></div>
<div class="ttc" id="class_bezier_curve_html_af260806a5be9aff91007286940fc951d"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">BezierCurve::_end_time</a></div><div class="ttdeci">T _end_time</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00012">BezierCurve.h:12</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/da0/class_bezier_curve_a805009db14dd135e46f55d83c7463d69_icgraph.png" border="0" usemap="#df/da0/class_bezier_curve_a805009db14dd135e46f55d83c7463d69_icgraph" alt=""/></div>
<map name="df/da0/class_bezier_curve_a805009db14dd135e46f55d83c7463d69_icgraph" id="df/da0/class_bezier_curve_a805009db14dd135e46f55d83c7463d69_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aec81de7e144ac68128c19f16c24880a6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::getCurveVelocity </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>u</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>ret</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00060">60</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

<p>References <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00012">BezierCurve&lt; T, DIM, NUM_CTR_PT &gt;::_end_time</a>.</p>
<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                                     {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">if</span> (u &gt; <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a>) {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        ret[i] = 0.;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (u &lt; 0.) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        ret[i] = 0.;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;      }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      u /= <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        ret[i] = 0.;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        ret[i] += <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[0] *</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                  (-(NUM_CTR_PT - 1) * pow(1 - u, (NUM_CTR_PT - 1) - 1)) *</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                  <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[0][i];</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j(1); j &lt; NUM_CTR_PT - 1; ++j) {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;          ret[i] += <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[j] *</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                    (j * pow(u, j - 1) * pow(1 - u, (NUM_CTR_PT - 1) - j) -</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                     (NUM_CTR_PT - 1 - j) * pow(u, j) *</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                         pow(1 - u, (NUM_CTR_PT - 1) - j - 1)) *</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                    <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[j][i];</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        ret[i] += <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[NUM_CTR_PT - 1] * (NUM_CTR_PT - 1) *</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                  pow(u, NUM_CTR_PT - 2) * <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[NUM_CTR_PT - 1][i];</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        ret[i] /= <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  }</div><div class="ttc" id="class_bezier_curve_html_a724f444a65d87f2b4a475c44a2eedf02"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">BezierCurve::_CtrlPt</a></div><div class="ttdeci">T _CtrlPt[NUM_CTR_PT][DIM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00010">BezierCurve.h:10</a></div></div>
<div class="ttc" id="class_bezier_curve_html_adeb66b287ab1251b35c4836a73024e50"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">BezierCurve::_coeff</a></div><div class="ttdeci">T _coeff[NUM_CTR_PT]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00011">BezierCurve.h:11</a></div></div>
<div class="ttc" id="class_bezier_curve_html_af260806a5be9aff91007286940fc951d"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">BezierCurve::_end_time</a></div><div class="ttdeci">T _end_time</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00012">BezierCurve.h:12</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/da0/class_bezier_curve_aec81de7e144ac68128c19f16c24880a6_icgraph.png" border="0" usemap="#df/da0/class_bezier_curve_aec81de7e144ac68128c19f16c24880a6_icgraph" alt=""/></div>
<map name="df/da0/class_bezier_curve_aec81de7e144ac68128c19f16c24880a6_icgraph" id="df/da0/class_bezier_curve_aec81de7e144ac68128c19f16c24880a6_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a6b0d1dfab02b83f2a0ddcc998e359eef"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::SetParam </td>
          <td>(</td>
          <td class="paramtype">T **&#160;</td>
          <td class="paramname"><em>ctrl_pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>fin_time</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00024">24</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

<p>References <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00095">BezierCurve&lt; T, DIM, NUM_CTR_PT &gt;::_factorial()</a>.</p>
<div class="fragment"><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;                                         {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">_end_time</a> = fin_time;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    T n_fact = <a class="code" href="../../df/da0/class_bezier_curve.html#a09ecb5e8cce832d9b26bc58b37eaed12">_factorial</a>(NUM_CTR_PT - 1);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j(0); j &lt; NUM_CTR_PT; ++j) {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; DIM; ++i) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <a class="code" href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">_CtrlPt</a>[j][i] = ctrl_pt[j][i];</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;      }</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      <a class="code" href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">_coeff</a>[j] = n_fact / (<a class="code" href="../../df/da0/class_bezier_curve.html#a09ecb5e8cce832d9b26bc58b37eaed12">_factorial</a>(j) * <a class="code" href="../../df/da0/class_bezier_curve.html#a09ecb5e8cce832d9b26bc58b37eaed12">_factorial</a>((NUM_CTR_PT - 1) - j));</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  }</div><div class="ttc" id="class_bezier_curve_html_a724f444a65d87f2b4a475c44a2eedf02"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#a724f444a65d87f2b4a475c44a2eedf02">BezierCurve::_CtrlPt</a></div><div class="ttdeci">T _CtrlPt[NUM_CTR_PT][DIM]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00010">BezierCurve.h:10</a></div></div>
<div class="ttc" id="class_bezier_curve_html_adeb66b287ab1251b35c4836a73024e50"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#adeb66b287ab1251b35c4836a73024e50">BezierCurve::_coeff</a></div><div class="ttdeci">T _coeff[NUM_CTR_PT]</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00011">BezierCurve.h:11</a></div></div>
<div class="ttc" id="class_bezier_curve_html_af260806a5be9aff91007286940fc951d"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#af260806a5be9aff91007286940fc951d">BezierCurve::_end_time</a></div><div class="ttdeci">T _end_time</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00012">BezierCurve.h:12</a></div></div>
<div class="ttc" id="class_bezier_curve_html_a09ecb5e8cce832d9b26bc58b37eaed12"><div class="ttname"><a href="../../df/da0/class_bezier_curve.html#a09ecb5e8cce832d9b26bc58b37eaed12">BezierCurve::_factorial</a></div><div class="ttdeci">int _factorial(const int &amp;n)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d66/_bezier_curve_8h_source.html#l00095">BezierCurve.h:95</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_cgraph.png" border="0" usemap="#df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_cgraph" alt=""/></div>
<map name="df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_cgraph" id="df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_icgraph.png" border="0" usemap="#df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_icgraph" alt=""/></div>
<map name="df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_icgraph" id="df/da0/class_bezier_curve_a6b0d1dfab02b83f2a0ddcc998e359eef_icgraph">
</map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="adeb66b287ab1251b35c4836a73024e50"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::_coeff[NUM_CTR_PT]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00011">11</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

</div>
</div>
<a class="anchor" id="a724f444a65d87f2b4a475c44a2eedf02"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::_CtrlPt[NUM_CTR_PT][DIM]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00010">10</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

</div>
</div>
<a class="anchor" id="af260806a5be9aff91007286940fc951d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int DIM, int NUM_CTR_PT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T <a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a>&lt; T, DIM, NUM_CTR_PT &gt;::_end_time</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html#l00012">12</a> of file <a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="../../d7/d66/_bezier_curve_8h_source.html">BezierCurve.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../df/da0/class_bezier_curve.html">BezierCurve</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
